package entity;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.GenericGenerator;

/**
 * Kit entity.
 *
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "kit", schema = "public")
public class Kit implements java.io.Serializable {

    // Fields
    private Integer id;
    private Guichet guichet;
    private Billet billet;
    private String idsSpec;
    private double prixTotal;
    private double prixAchat;
    private Integer remise;
    private Date date;
    private Date time;
   
    private Integer nombre;
    // Constructors

    /**
     * default constructor
     */
    public Kit() {
    }

    /**
     * full constructor
     */
    public Kit(Guichet guichet, Billet billet, String idsSpec,
            double prixTotal, double prixAchat, Integer remise, Date date,
            Date time ) {
        this.guichet = guichet;
        this.billet = billet;
        this.idsSpec = idsSpec;
        this.prixTotal = prixTotal;
        this.prixAchat = prixAchat;
        this.remise = remise;
        this.date = date;
        this.time = time;
  
    }

    // Property accessors
    @GenericGenerator(name = "generator", strategy = "increment")
    @Id
    @GeneratedValue(generator = "generator")
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "id_guichet")
    public Guichet getGuichet() {
        return this.guichet;
    }

    public void setGuichet(Guichet guichet) {
        this.guichet = guichet;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "id_billet")
    public Billet getBillet() {
        return this.billet;
    }

    public void setBillet(Billet billet) {
        this.billet = billet;
    }

    @Column(name = "ids_spec")
    public String getIdsSpec() {
        return this.idsSpec;
    }

    public void setIdsSpec(String idsSpec) {
        this.idsSpec = idsSpec;
    }
    @Column(name = "nombre")
    public Integer getNombre() {
        return nombre;
    }

    public void setNombre(Integer nombre) {
        this.nombre = nombre;
    }

    @Column(name = "prix_total", precision = 17, scale = 17)
    public double getPrixTotal() {
        return this.prixTotal;
    }

    public void setPrixTotal(double prixTotal) {
        this.prixTotal = prixTotal;
    }

    @Column(name = "prix_achat", precision = 17, scale = 17)
    public double getPrixAchat() {
        return this.prixAchat;
    }

    public void setPrixAchat(double prixAchat) {
        this.prixAchat = prixAchat;
    }

    @Column(name = "remise")
    public Integer getRemise() {
        return this.remise;
    }

    public void setRemise(Integer remise) {
        this.remise = remise;
    }

    @Temporal(TemporalType.DATE)
    @Column(name = "date", length = 13)
    public Date getDate() {
        return this.date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    @Column(name = "time", length = 15)
    public Date getTime() {
        return this.time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

   
}